import random


class Person:

    def __init__(self, name, money):
        self.name = name
        self.money = money

    def show(self):
        print(f'我是{self.name}，现在有{self.money}块钱')


class Manager(Person):
    """群主类"""
    red_pockets = []

    def send(self, num: int,money: int):
        for i in range(num):
            self.money -= money
            self.red_pockets.append(money)


class Member(Person):
    """成员类"""

    def get(self,red_list):
        if len(red_list) == 0:
            print("红包已经抢完了")
            return
        self.money += red_list.pop()



if __name__ == '__main__':
    manager = Manager(name='耿世杰',money=6000)
    manager.show()

    manager.send(num=2,money=3)
    manager.show()
    a = Member(name='a',money=0)
    b=Member(name="b",money=0)
    c = Member(name="c",money=0)
    a.get(manager.red_pockets)
    a.show()
    b.get(manager.red_pockets)
    b.show()
